import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/staff_Home',
    name: 'staff_Home',
    component: () => import('../views/staff_Home.vue'),
    children: [
      {
        path: "/staff_Home/traininginfo",
        name: "staff_Home_traininginfo",
        meta: {
          isShow: true,
          title: "培训信息"
        },
        component: () => import('../components/staff_TrainingInfo.vue')
      },
      {
        path: "/staff_Home/lectureinfo",
        name: "staff_Home_lectureinfo",
        meta: {
          isShow: true,
          title: "课程信息"
        },
        component: () => import('../components/staff_LectureInfo.vue')
      },
      {
        path: "/staff_Home/teacherinfo",
        name: "staff_Home_teacherinfo",
        meta: {
          isShow: true,
          title: "讲师信息"
        },
        component: () => import('../components/staff_TeacherInfo.vue')
      },
      {
        path: "/staff_Home/applicationinfo",
        name: "staff_Home_applicationinfo",
        meta: {
          isShow: true,
          title: "报名信息"
        },
        component: () => import('../components/staff_ApplicationInfo.vue')
      },
    ]
  },

  {
    path: '/manage_Home',
    name: 'manage_Home',
    component: () => import('../views/manage_Home.vue'),
    children: [
      {
        path: "/manage_Home/trainingapplyinfo",
        name: "manage_Home_trainingapplyinfo",
        meta: {
          isShow: true,
          title: "培训申请"
        },
        component: () => import('../components/manage_TrainingApplyInfo.vue')
      },
      {
        path: "/manage_Home/trainingplaninfo",
        name: "manage_Home_trainingplaninfo",
        meta: {
          isShow: true,
          title: "培训计划"
        },
        component: () => import('../components/manage_TrainingPlanInfo.vue')
      },
      {
        path: "/manage_Home/teacherinfo",
        name: "manage_Home_teacherinfo",
        meta: {
          isShow: true,
          title: "讲师信息"
        },
        component: () => import('../components/staff_TeacherInfo.vue')
      },
      {
        path: "/manage_Home/manage_applicationinfo",
        name: "manage_applicationinfo",
        meta: {
          isShow: true,
          title: "报名信息"
        },
        component: () => import('../components/staff_ApplicationInfo.vue')
      },
    ]
  },

  {
    path: '/onsite_Home',
    name: 'onsite_Home',
    component: () => import('../views/onsite_Home.vue'),
    children: [
      {
        path: "/onsite_Home/applicationinfo",
        name: "onsite_Home_applicationinfo",
        meta: {
          isShow: true,
          title: "报名信息"
        },
        component: () => import('../components/onsite_ApplicationInfo.vue')
      },
      {
        path: "/onsite_Home/lectureinfo",
        name: "onsite_Home_lectureinfo",
        meta: {
          isShow: true,
          title: "课程信息"
        },
        component: () => import('../components/onsite_LectureInfo.vue')
      },
      {
        path: "/onsite_Home/questionaireinfo",
        name: "onsite_Home_questionaireinfo",
        meta: {
          isShow: true,
          title: "调查统计"
        },
        component: () => import('../components/onsite_QuestionaireInfo.vue')
      },
    ]
  },

  {
    path: '/company',
    name: 'company',
    component: () => import('../components/company_ApplicationInfo.vue')
  },

  {
    path: '/student_login',
    name: 'StudentLogin',
    component: () => import('../views/studentLoginRegister.vue')
  },

  {
    path: '/company_login',
    name: 'CompanyLogin',
    component: () => import('../views/companyLoginRegister.vue')
  },

  {
    path: "/worker_login",
    name: 'WorkerLogin',
    component: () => import('../components/worker_Login.vue')
  },

  {
    name: 'student_Home',
    path: '/student_Home',
    component: () => import('../views/home.vue')
  },
  {
    name: 'entryform',
    path: '/entryform/:id',
    component: () => import('../views/entryform.vue')
  },
  {
    name: 'notification',
    path: '/notification',
    component: () => import('../views/notification.vue')
  },
  {
    name: 'questionary',
    path: '/questionary',
    component: () => import('../views/questionary.vue')
  },
  {
    name: 'courses',
    path: '/courses/:id',
    component: () => import('../views/courses.vue')
  },
  {
    path: '/:catchAll(.*)',
    name: '404',
    component: () => import('../views/404.vue')
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
